package com.yootk.test;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;

public class CreateGatewayDatetime { // 创建一个日期时间数据
    public static void main(String[] args) {
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        ZoneId zoneId = ZoneId.systemDefault(); // 获取默认的区域ID
        LocalDateTime localDateTime = LocalDateTime.parse("2050-02-17 21:15:32", formatter);
        ZonedDateTime now = ZonedDateTime.of(localDateTime, zoneId);
        System.out.println(now);
    }
}
